\documentclass[twoside,openright]{book}

\pagestyle{headings}
\usepackage{euler}
\usepackage{eucal}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage{svg}
\usepackage{animate}
\usepackage{minted}
\newminted{cpp}{linenos, xleftmargin=0.5in}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{ulem}
\usepackage{tocloft}
% \usepackage[tocindentauto]{tocstyle}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{makecell}
\usepackage[colorlinks]{hyperref}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{tcolorbox}
\usepackage{emptypage}
\newcommand{\hr}{\par\bigskip\noindent\hrulefill\par\bigskip}
\tcbuselibrary{skins,breakable,theorems}
\newcommand{\mdcol}[2]{\definecolor{#1}{HTML}{#2}}
\mdcol{MDQUOTE}{9e9e9e}
\mdcol{MDBUG}{f50057}
\mdcol{MDDANGER}{ff1744}
\mdcol{MDFAILURE}{ff5252}
\mdcol{MDWARNING}{ff9100}
\mdcol{MDQUESTION}{64dd17}
\mdcol{MDSUCCESS}{00c853}
\mdcol{MDTIP}{00bfa5}
\mdcol{MDINFO}{00b8d4}
\mdcol{MDABSTRACT}{00b0ff}
\mdcol{MDNOTE}{448aff}
\newfontfamily{\ICON}{MaterialIcons-Regular.ttf}
\newcommand{\mdico}[2]{\newcommand{#1}{{{\ICON\symbol{#2}}}}}
\mdico{\MIQUOTE}{"E244}
\mdico{\MIBUG}{"E868}
\mdico{\MIDANGER}{"E3E7}
\mdico{\MIFAILURE}{"E14C}
\mdico{\MIWARNING}{"E002}
\mdico{\MIQUESTION}{"E887}
\mdico{\MISUCCESS}{"E876}
\mdico{\MITIP}{"E80E}
\mdico{\MIINFO}{"E88E}
\mdico{\MIABSTRACT}{"E8D2}
\mdico{\MINOTE}{"E3C9}
\newcommand{\mdext}[4]{\newtcbtheorem[no counter]{#1}{\textcolor{#2}{#3} #4}
{theorem style=change apart,enhanced,leftrule=2pt,toprule=0mm,
bottomrule=0mm,left=0mm,rightrule=0mm,right=0mm,titlerule=0mm,
toptitle=0mm,bottomtitle=1mm,top=0mm,colframe=#2,coltitle=black,
title style={color=#2!25!white},colback=white,shadow={1pt}{-1pt}
{0mm}{color=black!20!white},arc=0.5mm,fonttitle=\bf\normalsize}{theo}}
\mdext{QUOTE}{MDQUOTE}{\MIQUOTE}{Quote}
\mdext{BUG}{MDBUG}{\MIBUG}{Bug}
\mdext{DANGER}{MDDANGER}{\MIDANGER}{Danger}
\mdext{FAILURE}{MDFAILURE}{\MIFAILURE}{Failure}
\mdext{WARNING}{MDWARNING}{\MIWARNING}{Warning}
\mdext{QUESTION}{MDQUESTION}{\MIQUESTION}{Question}
\mdext{SUCCESS}{MDSUCCESS}{\MISUCCESS}{Success}
\mdext{TIP}{MDTIP}{\MITIP}{Tip}
\mdext{INFO}{MDINFO}{\MIINFO}{Info}
\mdext{ABSTRACT}{MDABSTRACT}{\MIABSTRACT}{Abstract}
\mdext{NOTE}{MDNOTE}{\MINOTE}{Note}
\newlist{todolist}{itemize}{2}
\setlist[todolist]{label=$\square$}
\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
\newcommand{\done}{\rlap{$\square$}{\raisebox{2pt}{\large\hspace{1.5pt}\cmark}}%
\hspace{-2.5pt}}
\newcommand{\wontfix}{\rlap{$\square$}{\large\hspace{1.5pt}\xmark}}
\graphicspath{{./pictures/}}
\geometry{top=0.5in,left=0.5in,right=0.5in,bottom=0.5in}
\setcounter{tocdepth}{7}
\setCJKmainfont{Source Han Sans SC}
\setmainfont{Fira Code}
\setmonofont{Fira Code}
\addtolength{\cftsecnumwidth}{1em}
\addtolength{\cftsubsecnumwidth}{1em}
\addtolength{\cftsubsecindent}{1em}
\addtolength{\cftsubsubsecindent}{2em}
% \AtBeginDocument{\settowidth{\sectionnumwidth}{6.20.20\ }}


